//
//  ViewController.swift
//  MKDatePickerController
//
//  Created by 劢克科技 on 2019/5/17.
//  Copyright © 2019 meckey. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }

    @IBAction func handleClick(_ sender: Any) {
        let controller = MKDatePickerViewController()
        controller.delegate = self
        self.present(controller, animated: false, completion: nil)
    }
    
}

extension ViewController: MKDatePickerViewControllerDelegate {
    func handleGetDate(date: Date) {
        print(date.description(with: Locale(identifier: "zh_Hans_CN")))
    }
}
